package com.rainng.coursesystem.repository;

import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface PostRepository extends JpaRepository<PostEntity, Long> {
    List<PostEntity> findByCourseId(int courseId);
    boolean existsById(int postId);  // JPA 会自动生成这个方法
}
